package com.leyou.common.constants;

public class UserHolder {

    private static ThreadLocal<Long> TL = new ThreadLocal<>();

    public static Long getUserId(){
        return TL.get();
    }

    public static void setUserId(Long userId){
       TL.set(userId);
    }

    public static void remove(Long userId){
        TL.remove();
    }

}
